<?php



class AccountCustomerMapBuilder implements MapBuilder {

	
	const CLASS_NAME = 'lib.model.map.AccountCustomerMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap(AccountCustomerPeer::DATABASE_NAME);

		$tMap = $this->dbMap->addTable(AccountCustomerPeer::TABLE_NAME);
		$tMap->setPhpName('AccountCustomer');
		$tMap->setClassname('AccountCustomer');

		$tMap->setUseIdGenerator(false);

		$tMap->addForeignPrimaryKey('CONTACT_IDEN', 'ContactIden', 'VARCHAR' , 'contact', 'IDEN', true, 20);

		$tMap->addColumn('CURRENCY_CODE', 'CurrencyCode', 'VARCHAR', true, 10);

		$tMap->addForeignKey('DEFAULT_TERMS', 'DefaultTerms', 'VARCHAR', 'list_invoice_terms', 'TERM', true, 50);

		$tMap->addColumn('STATUS', 'Status', 'VARCHAR', true, 20);

		$tMap->addColumn('REMARKS', 'Remarks', 'LONGVARCHAR', true, null);

		$tMap->addColumn('CUSTOMER_INDUSTRY', 'CustomerIndustry', 'LONGVARCHAR', true, null);

		$tMap->addForeignKey('DEFAULT_OWNER_IDEN', 'DefaultOwnerIden', 'VARCHAR', 'account_owner', 'CONTACT_IDEN', true, 20);

		$tMap->addColumn('TIN_NUMBER', 'TinNumber', 'VARCHAR', true, 30);

		$tMap->addColumn('CREDIT_LIMIT', 'CreditLimit', 'DOUBLE', true, null);

		$tMap->addColumn('VAT_EXCEMPT_TYPE', 'VatExcemptType', 'VARCHAR', true, 20);

	} 
} 